<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>

<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.connection.jdbconnection"%>

<% HttpSession hs=request.getSession(false); 
if(hs.getAttribute("userName")==null)
{

response.sendRedirect("Login.jsp");
out.println(hs);
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>

<link rel="stylesheet" type="text/css" href="Style.css">

</head>
<body>

	<jsp:include page="header.jsp"></jsp:include>

	<form action="StudentUpdate" method="post">
		<div id="bv_TabMenu1"
			style="margin:0;padding:0;position:absolute;left:295px;top:143px;width:700px;height:40px;text-align:left;z-index:1;">

			<div id="Menu1">
				<hr  id="Line2"
					style="color:#000000;background-color:#000000;border:0px;margin:0;padding:0;position:absolute;left:-70px;top:47px;width:790px;height:2px;z-index:3">

				<ul>
<a href="FacultyHome.jsp"><span>Home</span></a>&nbsp;&nbsp;&nbsp;
<a href="StudentForm.jsp"><span>StudentForm</span></a>&nbsp;&nbsp;&nbsp;
<a href="View.jsp"><span>Student View</span></a>&nbsp;&nbsp;&nbsp;
<a href="Find.jsp"><span>Student Find</span></a>&nbsp;&nbsp;&nbsp;
<a href="Courses.jsp"><span>Courses</span></a>&nbsp;&nbsp;&nbsp;
<a href="Feedback.jsp"><span>Feedback</span></a>&nbsp;&nbsp;&nbsp;
<a href="Contact.jsp"><span>Contact Us</span></a>
				</ul>

			</div>

		</div>
		<%

String userName=(String)session.getAttribute("userName");

session.setAttribute("userName", userName);
 %>
<div style="margin-left: 166px; margin-top: -90px"><font style="font-family: inherit; color:green; font-size: 18px"> Welcome &nbsp; </font> <%=userName %>
</div>
<div style="margin-left:935px; margin-top:-20px;"><font style="font-family:inherit; color:green; font-size: 18px; ">
<a href="Index.jsp" style="text-decoration: none;">LogOut</a></font></div>

		

		<%
		Connection conn=null;
		Statement st=null;
		ResultSet rs=null;
		String student_id=request.getParameter("id");
		try{
		jdbconnection db=new jdbconnection();
		st=db.jdbConnection();
		String QString="select * from studentform where student_id='" + student_id + "'";
		rs=st.executeQuery(QString);  
		if(rs.next()){
		String studentid=rs.getString(1);
		String sname=rs.getString(2);
		String fname=rs.getString(3);
		String dob=rs.getString(4);
		String gender=rs.getString(5);
		String address=rs.getString(6);
		String contact=rs.getString(7);
		String emailid=rs.getString(8);
		String course=rs.getString(9);
		String upload=rs.getString(10);
		String batch=rs.getString(11);
		String issuedate=rs.getString(12);
		String validuntill=rs.getString(13);
	
		
		
		 %>


		<font color="Blue" size="4"
			style="margin-left: 300px;top:20px; text-align: center;position: absolute;top: 200px;font-family: cursive; "><u>Update
				Student Details...</u> </font>
		<div
			style="margin-left: 300px;top:20px; text-align: center;position: absolute;top: 230px;font: bold;">
			Student Enrollment No. : <input type="text" value="<%=student_id %>"
				name="sid"  />
		</div>
		<br>
		<div
			style="margin-left: 354px;top:20px; text-align: center;position:absolute;top: 260px;font: bold;">
			Student Name : <input type="text" value="<%=sname %>" name="sname" />
		</div>
		<br>

		<div
			style="margin-left: 353px;top:20px; text-align: center;position:absolute;top: 290px;font: bold;">
			Father's Name : <input type="text" value="<%=fname %>" name="fname" />
		</div>
		<br>

		<div
			style="margin-left: 363px;top:20px; text-align: center;position:absolute;top: 320px;font: bold;">
			Date of Birth : <input type="date" value="<%=dob %>" name="dob" />
		</div>
		<br>

		<div
			style="margin-left: 397px;top:20px; text-align: center;position:absolute;top: 350px;font: bold;">
			Gender : <select name="gender">
				<option selected>select</option>
				<option value="F">Female</option>
				<option value="M">Male</option>
				<option value="<%=gender%>" selected><%=gender%></option>

			</select>

		</div>
		<br>

		<div
			style="margin-left: 388px;top:20px; text-align: center;position:absolute;top: 380px;font: bold;">
			Address :</div>
		<div
			style="margin-left: 453px;top:20px; text-align: center;position:absolute;top: 380px;font: normal;">
			<textarea name="address" rows="2" cols="24"><%=address %></textarea>
		</div>
		<br>
		<div
			style="margin-left: 341px;top:20px; text-align: center;position:absolute;top: 428px;font: bold;">
			Contact Number : <input type="text" value="<%=contact %>"
				name="contact" />
		</div>
		<br>
		<div
			style="margin-left: 394px;top:20px; text-align: center;position:absolute;top: 458px;font: bold;">
			Email Id : <input type="text" value="<%=emailid %>" name="emailid" />
		</div>
		<br>
		<div
			style="margin-left: 357px;top:20px; text-align: center;position:absolute;top: 488px;font: bold;">
			Upload Image : <input type="text" value="<%=upload%>" name="upload" disabled="disabled" />
		</div>
		<br>
		<div
			style="margin-left: 397px;top:20px; text-align: center;position:absolute;top: 518px;font: bold;">
			Course : <select name="course">
				<option selected value="">Select</option>
				<optgroup label="Doeacc Courses..."></optgroup>
				<option>A Level</option>
				<option>O Level</option>
				<option>CCC</option>
				<optgroup label="P.T.U. Courses..."></optgroup>
				<option>M.C.A.</option>
				<option>M.Sc.-IT</option>
				<option>M.Sc-CS</option>
				<option>B.C.A.</option>
				<option>P.G.D.C.A.</option>
				<optgroup label="Others"></optgroup>
				<option>D.C.A.</option>
				<option value="<%=course%>" selected><%=course%></option>

					</select>

		</div>
		<br>
		<div
			style="margin-left: 577px;top:20px; text-align: center;position:absolute;top: 518px;font: bold;">
			Batch : <input type="text" value="<%=batch %>" name="batch" />
		</div>
		<br>
		
		<div
			style="margin-left: 377px;top:20px; text-align: center;position:absolute;top: 548px;font: bold;">
			Issue Date : <input type="date" value="<%=issuedate %>" name="issuedate" />
		</div>
		<br>
		<div
			style="margin-left: 373px;top:20px; text-align: center;position:absolute;top: 578px;font: bold;">
			Valid Untill : <input type="date" value="<%=validuntill %>" name="validuntill" />
		</div>
		
		<%
				}
				st.close();
				conn.close();
				}
				catch(Exception e){}
				 %>
		
		
		<br>
		<br>
		<div
			style="margin-left: 393px;top:20px; text-align: center;position:absolute;top: 618px;font: bold;">
					<input type="reset" name="Reset"/></div>
		<br>
		<div
			style="margin-left: 593px;top:20px; text-align: center;position:absolute;top: 618px;font: bold;">
					<input type="submit" name="Submit" value="Submit"/></div>			
		

	</form>
<hr  id="Line3"
					style="color:#000000;background-color:#000000;border:0px;margin:0;padding:0;position:absolute;left:180px;top:670px;width:834px;height:2px;z-index:3">


<div align="center" >
	<jsp:include page="Footer1.jsp" ></jsp:include>
</div>
</body>



</html>
